home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / mc51bugs.zip / Q30539 < prev    next >
Text File  |  1989-02-02  |  1KB  |  50 lines

  1. Q30539 80287 Instruction Inserted in Assembly Listing with /G1
  2. Microsoft C Compiler
  3. 5.10
  4. MS-DOS
  5.  
  6. Summary:
  7.  
  8. When the following program is compiled with /G1 (to generate code for
  9. the 80186 processor) and /Fa (to produce an assembly language listing)
  10. the resultant assembly language listing will fail to assemble because
  11. the assembly code contains the following instruction:
  12.  
  13.    fstsw ax
  14.  
  15. This instruction is an 80287 instruction but does not contain the .287
  16. directive.
  17.  
  18. Microsoft has confirmed this to be a problem in Version 5.10 of the C
  19. compiler. This is also a problem with the FORTRAN Version 4.10
  20. compiler using the same compiler switches. The FORTRAN code also
  21. compares two doubles.
  22.  
  23. Microsoft is researching this information and will post new
  24. information as it becomes available.
  25.  
  26. More Information:
  27.  
  28. The following code demonstrates this problem:
  29.  
  30.    /*
  31.    Compile /Fa /G1 /c
  32.    */
  33.  
  34.    #include <stdio.h>
  35.    #include <float.h>
  36.    #include <math.h>
  37.  
  38.    main()
  39.    {
  40.            double a,b;
  41.  
  42.            if (a > b)
  43.                printf("A>B");
  44.            else
  45.                printf("A<=B");
  46.    }
  47.  
  48. Keywords:  buglist5.10 h_fortran
  49. Updated  89/02/02 05:55
  50.